package com.xvheng.module.backendApi.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xvheng.common.annotation.Excel;
import com.xvheng.common.core.domain.BaseEntity;

/**
 * 卡券信息对象 tm_coupon
 *
 * @author xvheng
 * @date 2025-01-09
 */
public class Coupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增id */
    private String id;

    /** 商户id */
    @Excel(name = "商户id")
    private String merchantId;

    /** 店铺id */
    @Excel(name = "店铺id")
    private String storeId;

    /** 券组id */
    @Excel(name = "券组id")
    private String groupId;

    /** 券类型，C优惠券；P预存卡；T集次卡 */
    @Excel(name = "券类型，C优惠券；P预存卡；T集次卡")
    private String type;

    /** 券名称 */
    @Excel(name = "券名称")
    private String name;

    /** 是否允许转赠 */
    @Excel(name = "是否允许转赠")
    private Integer isGive;

    /** 适用会员等级 */
    @Excel(name = "适用会员等级")
    private String gradeIds;

    /** 获得卡券所消耗积分 */
    @Excel(name = "获得卡券所消耗积分")
    private Long point;

    /** 适用商品：allGoods、parkGoods */
    @Excel(name = "适用商品：allGoods、parkGoods")
    private String applyGoods;

    /** 领取码 */
    @Excel(name = "领取码")
    private String receiveCode;

    /** 使用专项 */
    @Excel(name = "使用专项")
    private String userFor;

    /** 过期类型 */
    @Excel(name = "过期类型")
    private String expireType;

    /** 有效期，单位：天 */
    @Excel(name = "有效期，单位：天")
    private Long expireTime;

    /** 开始有效期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date beginTime;

    /** 结束有效期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 充值金额 */
    @Excel(name = "充值金额")
    private BigDecimal amount;

    /** 发放方式 */
    @Excel(name = "发放方式")
    private String sendWay;

    /** 每次发放数量 */
    @Excel(name = "每次发放数量")
    private Integer sendNum;

    /** 发行数量 */
    @Excel(name = "发行数量")
    private Long total;

    /** 每人拥有数量限制 */
    @Excel(name = "每人拥有数量限制")
    private Long limitNum;

    /** 不可用日期，逗号隔开。周末：weekend；其他：2019-01-02_2019-02-09 */
    @Excel(name = "不可用日期，逗号隔开。周末：weekend；其他：2019-01-02_2019-02-09")
    private String exceptTime;

    /** 所属店铺id,逗号隔开 */
    @Excel(name = "所属店铺id,逗号隔开")
    private String storeIds;

    /** 描述信息 */
    @Excel(name = "描述信息")
    private String description;

    /** 效果图片 */
    @Excel(name = "效果图片")
    private String image;

    /** 后台备注 */
    @Excel(name = "后台备注")
    private String remarks;

    /** 获取券的规则 */
    @Excel(name = "获取券的规则")
    private String inRule;

    /** 核销券的规则 */
    @Excel(name = "核销券的规则")
    private String outRule;

    /** 最后操作人 */
    @Excel(name = "最后操作人")
    private String operator;

    /** A：正常；D：删除 */
    @Excel(name = "A：正常；D：删除")
    private String status;

    /** 赠送金额 */
    @Excel(name = "赠送金额")
    private BigDecimal giveMoney;

    /** 可用金额(充值金额+赠送金额) */
    @Excel(name = "可用金额(充值金额+赠送金额)")
    private BigDecimal usableMoney;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    private Integer orderNum;

    /** 可用次数 */
    @Excel(name = "可用次数")
    private BigDecimal usableTime;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setMerchantId(String merchantId)
    {
        this.merchantId = merchantId;
    }

    public String getMerchantId()
    {
        return merchantId;
    }
    public void setStoreId(String storeId)
    {
        this.storeId = storeId;
    }

    public String getStoreId()
    {
        return storeId;
    }
    public void setGroupId(String groupId)
    {
        this.groupId = groupId;
    }

    public String getGroupId()
    {
        return groupId;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setIsGive(Integer isGive)
    {
        this.isGive = isGive;
    }

    public Integer getIsGive()
    {
        return isGive;
    }
    public void setGradeIds(String gradeIds)
    {
        this.gradeIds = gradeIds;
    }

    public String getGradeIds()
    {
        return gradeIds;
    }
    public void setPoint(Long point)
    {
        this.point = point;
    }

    public Long getPoint()
    {
        return point;
    }
    public void setApplyGoods(String applyGoods)
    {
        this.applyGoods = applyGoods;
    }

    public String getApplyGoods()
    {
        return applyGoods;
    }
    public void setReceiveCode(String receiveCode)
    {
        this.receiveCode = receiveCode;
    }

    public String getReceiveCode()
    {
        return receiveCode;
    }
    public void setUserFor(String userFor)
    {
        this.userFor = userFor;
    }

    public String getUserFor()
    {
        return userFor;
    }
    public void setExpireType(String expireType)
    {
        this.expireType = expireType;
    }

    public String getExpireType()
    {
        return expireType;
    }
    public void setExpireTime(Long expireTime)
    {
        this.expireTime = expireTime;
    }

    public Long getExpireTime()
    {
        return expireTime;
    }
    public void setBeginTime(Date beginTime)
    {
        this.beginTime = beginTime;
    }

    public Date getBeginTime()
    {
        return beginTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setSendWay(String sendWay)
    {
        this.sendWay = sendWay;
    }

    public String getSendWay()
    {
        return sendWay;
    }
    public void setSendNum(Integer sendNum)
    {
        this.sendNum = sendNum;
    }

    public Integer getSendNum()
    {
        return sendNum;
    }
    public void setTotal(Long total)
    {
        this.total = total;
    }

    public Long getTotal()
    {
        return total;
    }
    public void setLimitNum(Long limitNum)
    {
        this.limitNum = limitNum;
    }

    public Long getLimitNum()
    {
        return limitNum;
    }
    public void setExceptTime(String exceptTime)
    {
        this.exceptTime = exceptTime;
    }

    public String getExceptTime()
    {
        return exceptTime;
    }
    public void setStoreIds(String storeIds)
    {
        this.storeIds = storeIds;
    }

    public String getStoreIds()
    {
        return storeIds;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }
    public void setImage(String image)
    {
        this.image = image;
    }

    public String getImage()
    {
        return image;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }

    public String getRemarks()
    {
        return remarks;
    }
    public void setInRule(String inRule)
    {
        this.inRule = inRule;
    }

    public String getInRule()
    {
        return inRule;
    }
    public void setOutRule(String outRule)
    {
        this.outRule = outRule;
    }

    public String getOutRule()
    {
        return outRule;
    }
    public void setOperator(String operator)
    {
        this.operator = operator;
    }

    public String getOperator()
    {
        return operator;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setGiveMoney(BigDecimal giveMoney)
    {
        this.giveMoney = giveMoney;
    }

    public BigDecimal getGiveMoney()
    {
        return giveMoney;
    }
    public void setUsableMoney(BigDecimal usableMoney)
    {
        this.usableMoney = usableMoney;
    }

    public BigDecimal getUsableMoney()
    {
        return usableMoney;
    }
    public void setOrderNum(Integer orderNum)
    {
        this.orderNum = orderNum;
    }

    public Integer getOrderNum()
    {
        return orderNum;
    }
    public void setUsableTime(BigDecimal usableTime)
    {
        this.usableTime = usableTime;
    }

    public BigDecimal getUsableTime()
    {
        return usableTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("merchantId", getMerchantId())
                .append("storeId", getStoreId())
                .append("groupId", getGroupId())
                .append("type", getType())
                .append("name", getName())
                .append("isGive", getIsGive())
                .append("gradeIds", getGradeIds())
                .append("point", getPoint())
                .append("applyGoods", getApplyGoods())
                .append("receiveCode", getReceiveCode())
                .append("userFor", getUserFor())
                .append("expireType", getExpireType())
                .append("expireTime", getExpireTime())
                .append("beginTime", getBeginTime())
                .append("endTime", getEndTime())
                .append("amount", getAmount())
                .append("sendWay", getSendWay())
                .append("sendNum", getSendNum())
                .append("total", getTotal())
                .append("limitNum", getLimitNum())
                .append("exceptTime", getExceptTime())
                .append("storeIds", getStoreIds())
                .append("description", getDescription())
                .append("image", getImage())
                .append("remarks", getRemarks())
                .append("inRule", getInRule())
                .append("outRule", getOutRule())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("operator", getOperator())
                .append("status", getStatus())
                .append("giveMoney", getGiveMoney())
                .append("usableMoney", getUsableMoney())
                .append("orderNum", getOrderNum())
                .append("usableTime", getUsableTime())
                .toString();
    }
}